import requests
import json

url = "http://localhost:8089/nbpApi//linkInsight/termCallback"

headers = {
    'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
    'Content-Type': 'application/json'
}

for i in range(3):
    # 将序号填充到 content 中
    content_value = str(i + 1)  # 转换为字符串，因为 JSON 需要字符串类型
    payload = json.dumps({
        "cmdType": 118,
        "msgId": "74e44ce9790b400fac410240c60693ad",
        "activeId": "",
        "deviceId": "8559",
        "userId": "LinkInsight",
        "content": content_value,  # 使用循环序号作为 content 的值
        "taskId": "3157",
        "status": 700,
        "timestamp": 1749109357870
    })

    print(f"这是第 {i + 1} 次循环")
    response = requests.request("POST", url, headers=headers, data=payload)

    print(response.text)